package credit.ccx.com.walletcore.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.math.BigInteger;

/**
 * Created by gongdongyang on 2018/7/5.
 */

public class WalletModel implements Parcelable{

    private String address;
    private String privateKey;
    private String pubKey;
    private String words;

    public WalletModel() {
    }

    /**
     *
     * @param address
     * @param privateKey
     * @param pubKey
     * @param words
     */
    public WalletModel(String address, String privateKey, String pubKey, String words) {
        this.address = address;
        this.privateKey = privateKey;
        this.pubKey = pubKey;
        this.words = words;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getPrivateKey() {
        return privateKey;
    }

    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }

    public String getPubKey() {
        return pubKey;
    }

    public void setPubKey(String pubKey) {
        this.pubKey = pubKey;
    }

    public String getWords() {
        return words;
    }

    public void setWords(String words) {
        this.words = words;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.address);
        dest.writeString(this.privateKey);
        dest.writeString(this.pubKey);
        dest.writeString(this.words);
    }

    protected WalletModel(Parcel in) {
        this.address = in.readString();
        this.privateKey = in.readString();
        this.pubKey = in.readString();
        this.words = in.readString();
    }

    public static final Creator<WalletModel> CREATOR = new Creator<WalletModel>() {
        @Override
        public WalletModel createFromParcel(Parcel source) {
            return new WalletModel(source);
        }

        @Override
        public WalletModel[] newArray(int size) {
            return new WalletModel[size];
        }
    };
}
